package string01;

public class SubstringDemo {
    public static void main(String[] args) {
        String str = "thinking in java";
        int start = str.indexOf("g")+1;
        int end = str.indexOf("j",start);
        String num = str.substring(start,end);
        System.out.println(num);






























        /*String str = "www.teduasdfad.cn";
        int start=str.indexOf(".")+1;
        int end = str.indexOf(".",start);
        String name = str.substring(start,end);
        System.out.println(name);*/

    }


}
